03.webview_flutter 文件上传

macOS 文件上传

macOS 下 WKWebView 点击文件上传无响应,这个问题看起来是与 WKWebView 相关《macos - How can you get input file to work in a WKWebView? - Stack Overflow》:

回答一:

Here is the 100% working solution for WKWebview "File Upload" Problem.

You just need to implement the UIDelegate:

- (void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSArray<NSURL *> *URLs))completionHandler;

Follow this link for more description about this delegate: RunOpenPanel Delegate

回答二:

This is a known bug in WKWebView.

https://bugs.webkit.org/show_bug.cgi?id=137759

When attempting to upload files by way of an <input> tag there is no action taken by WebKit on behalf of the user allowing them to input files to upload. The root cause of this seems to be that the "handleRunOpenPanel" is just unimplemented for OS X clients.


网络资源


本文作者:Maeiee

本文链接:03.webview_flutter 文件上传

版权声明:如无特别声明,本文即为原创文章,版权归 Maeiee 所有,未经允许不得转载!


喜欢我文章的朋友请随缘打赏,鼓励我创作更多更好的作品!